package org.idea.ietty.common.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author idea
 * @Date created in 10:37 下午 2020/5/6
 */
public class IettyConstants {

    public static final String APPLICATION_JSON = "application/json";

    public static final String X_WWW_FORM_URLENCODED = "x-www-form-urlencoded";

    public static final String CONTENT_TYPE="Content-Type";

    public static final String CONTENT_LENGTH="Content_Length";

    @Getter
    @AllArgsConstructor
    public enum ContentTypeEnum{

        TEXT_TYPE(CONTENT_TYPE,"text/plain"),
        PIC_TYPE(CONTENT_TYPE,"image/png"),
        CSS_TYPE(CONTENT_TYPE,"text/css"),
        JAVASCRIPT_TYPE(CONTENT_TYPE,"application/x-javascript"),
        JSON_TYPE(CONTENT_TYPE,"application/json");

        private String contentTypeKey;

        private String contentTypeDes;
    }


    @Getter
    @AllArgsConstructor
    public enum IettyStartStatusEnum{

        STATIC_SERVER(0,"静态资源服务器"),
        HTTP_SERVER(1,"web服务器");

        private int code;

        private String des;
    }
}
